<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>个人中心</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.css">
		<!--如果你用到了拓展包中的组件，还需要引用下面两个-->
		<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.css">
		<link rel="stylesheet" href="{{asset('/css/mobile/common_web.css')}}">
		<link rel="stylesheet" href="{{asset('/css/mobile/person_center.css')}}">
	</head>
	<body>
		<div class="page-group">
		<!-- 单个page ,第一个.page默认被展示-->
		<div class="page">
			<!-- 标题栏 -->
			<header class="bar bar-nav">
				<a onclick="location.href='{{url('/admin/home')}}'" class="icon icon-left pull-left" style="font-size:1.4rem;color:#fff;"></a>
				{{--<a onclick="location.href='{{url('/admin/informWeb')}}'" class="icon iconfont pull-right" style="font-size:1.4rem;color:#fff;">&#xe893;</a>--}}
				<h1 class="title">个人中心</h1>
			</header>

			<!-- 工具栏 -->
			<nav class="bar bar-tab" style="background:#fff;">
				<a class="tab-item external" onclick="location.href='{{url('/admin/home')}}'">
					<i class="icon iconfont">&#xe649;</i>
					<span class="tab-label">首页</span>
				</a>
				<a class="tab-item external active" onclick="location.href='{{url('/admin/person')}}'">
					<i class="icon iconfont">&#xe648;</i>
					<span class="tab-label">个人设置</span>
				</a>
			</nav>
			<!-- 这里是页面内容区 -->
			<div class="content">
				<div class="content-block">
					<div class="intro Flex">
						<div class="img_left">
							<img src="/images/icon/u110.png" alt="">
						</div>
						<div class="div_right">
							<h2>{{$res['user_name']}}，您好</h2>
							<p>地址：<span>{{$res['address']}}</span></p>
							<p>电话：<span>{{$res['phone']}}</span></p>
						</div>
					</div>
					<div class="ul_box">
						<ul class="cl">
							<li>
								<p>{{$res['money']}}</p>
								<p>
									<span>我的余额（￥）</span>
									<button type="button" class="open-slider-modal" style="-webkit-border-radius: 0.2rem;-moz-border-radius: 0.2rem;border-radius: 0.2rem;background:#fff;color:#2C4979;border:none;">提现</button>
								</p>
							</li>
							<li>
								<p>{{$res['sum']}}</p>
								<p>累计收入（￥）</p>
							</li>
							<li>
								<p>{{$res['kiting']}}</p>
								<p>提现金额（￥）</p>
							</li>
						</ul>
					</div>
				</div>
				<div class="list-block">
					<ul>
						<!-- Text inputs -->
						<li style="margin-bottom:0.5rem;">
							<a onclick="location.href='{{url('/admin/agencyUser')}}'">
								<div class="item-content">
									<div class="item-inner">
											我代理的用户
									</div>
								</div>
							</a>
						</li>
						<li>
							<a onclick="location.href='{{url('/admin/billIndex')}}'">
								<div class="item-content">
									<div class="item-inner">
										<div class="item-input">
											我的账单
										</div>
									</div>
								</div>
							</a>
						</li>
						<li>
							<a onclick="location.href='{{url('/admin/agentInform')}}'">
								<div class="item-content">
								<div class="item-inner">
										通知
								</div>
							</div>
							</a>
						</li>
						<li>
							<a onclick="location.href='{{url('/admin/historyRecord')}}'">
								<div class="item-content">
									<div class="item-inner">
										提现记录
									</div>
								</div>
							</a>
						</li>
						<li style="margin-top:0.5rem;">
							<a onclick="location.href='{{url('/admin/amendPassword')}}'">
								<div class="item-content">
									<div class="item-inner">
											修改密码
									</div>
								</div>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	</body>
	<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
	<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
	<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm-extend.js' charset='utf-8'></script>
	<script type="text/javascript" src="//g.alicdn.com/msui/sm/0.6.2/js/sm-city-picker.min.js" charset="utf-8"></script>
	<script>
		// $(function(){
			// 提现模态框
			$(document).on('click','.open-slider-modal', function () {
				var modal = $.modal({
					afterText:  '<div class="swiper-container" style="margin:0 auto;text-align: center;">\n' +
						'\t\t\t\t<h1 class="h1" style="color:#000;">申请提现</h1>\n' +
						'\t\t\t\t<p style="font-size:1rem;">您的账户余额为：<span>{{$res['money']}}</span>元，是否要提现？</p>\n' +
						'\t\t\t\t<p>注：<span>提现将全部提现，每月1-15日提现；</span></p>\n' +
						'\t\t\t\t<p>提现金不得低于100元</p>\n' +
						'\t\t' +
						'</div>',
					buttons: [
						{
							text: '取消'
						},
						{
							text: '确定',
							bold: true,
							onClick: function () {   
								    $.ajax({
								        type: "POST",
								        url: "http://{{$_SERVER['HTTP_HOST']}}/admin/kiting",
								        data:{},
								        dataType: "json",
								        success: function(data){
                                            if(data['msg']==1){
                                                $.alert('提现金不能低于100元且提现日期为1-15号');
											}else{
												$.alert('<div class="swiper-container" style="margin:0 auto;text-align: center;">\n' +'\t\t\t<h1 class="h1" style="color:#000;">申请成功</h1>\n' +'\t\t\t<p  style="font-size:1rem;">您申请提现金额为：<span>{{$res['money']}}</span>元</p>\n' +'\t\t\t<p>每月16日后，7至10个工作日到账，注意查看</p>\n' +'\t\t</div>');
                                            }
								        }
								    })

							}
						},
					]
				})
				$.swiper($(modal).find('.swiper-container'), {pagination: '.swiper-pagination'});
			});
		// })
	</script>
</html>
